<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>全局注册与本地注册组件</title>
	</head>
	<body>
		<div id="app">
      <button-counter></button-counter>
		</div>
	
		<script src="https://unpkg.com/vue@next"></script>
		<script>
      /*const app = Vue.createApp({})
      app.component('ButtonCounter', {
        data(){
          return {
            count: 0
          }
        },
        template: '<button @click="count++">点我 {{ count }}次</button>'
      })*/
      const app = Vue.createApp({
        components: {
          ButtonCounter: {
            data(){
              return {
                count: 0
              }
            },
            template: '<button @click="count++">点我 {{ count }}次</button>'
          }
        }
      })
      app.mount('#app')
    </script>
	</body>
</html>

